<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex flex-direction flex-wrap align-stretch benben-position-layout flex huishoushuju_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between huishoushuju_fd0_0'>
          <view class='flex align-center huishoushuju_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
            <text class='fu-iconfont2  huishoushuju_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
              data-url="1">&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-center'>
            <text class='huishoushuju_fd0_0_c1_c0'>回收数据</text>
          </view>
          <view class='flex align-center justify-end huishoushuju_fd0_0_c0'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>

      <view class="flex benben-flex-layout flex-wrap align-center">
        <view class='flex flex-wrap align-center justify-center flex-sub huishoushuju_fd1_0'>
          <view class='flex flex-direction flex-wrap align-center huishoushuju_fd1_0_c0'>
            <view class='flex flex-wrap align-center'>
              <text class='huishoushuju_fd1_0_c0_c0_c0'>{{info.huishou_num}}</text>
              <text class='huishoushuju_fd1_0_c0_c0_c1'>次</text>
            </view>
            <text class='huishoushuju_fd1_0_c0_c1'>回收总次数</text>
          </view>
          <view class='flex flex-wrap align-center justify-center huishoushuju_fd1_0_c0'>
            <view class='flex flex-direction flex-wrap align-center huishoushuju_fd1_0_c0_c0_c1'>
              <view class='flex flex-wrap align-center huishoushuju_fd1_0_c1_c0_c0'>
                <text class='huishoushuju_fd1_0_c0_c0_c0'>{{info.huishou_weight}}</text>
                <!-- <text>Kg</text> -->
              </view>
              <text class='huishoushuju_fd1_0_c0_c1'>回收总数量</text>
            </view>
          </view>
        </view>
      </view>


      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center huishoushuju_flex_2">
        <view>
          <benben-flex-tabs class-name='huishoushuju_benbenTabsfd2_0' v-model="tabsTypefd2_0" ref="benben_tabsfd2_0"
            select-mark="benben_tabsfd2_0" key="benben_tabsfd2_0" :open-title-type='false' :open-sticky='true' :top='0'
            :is-show-content='false' :scrollspy='false' :tabs-info.sync="tabsInfofd2_0">

            <scroll-view @scroll="tabsInfofd2_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd2_0"
              class="benben-tabs" style="width:750rpx" :scroll-x="true" :scroll-left.sync="tabsInfofd2_0.moveX"
              scroll-with-animation="all .3s ease">
              <view class="benben-tabs-content" id="benben_tabsfd2_0-content">
                <view id="benben_tabsfd2_0-title" class="benben-tabs-title flex flex align-center justify-around">
                  <view :class="{ 'checkTitlefd2_0': tabsTypefd2_0 == '1', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd2_0 = '1'" :id="`benben_tabsfd2_0-title-item-${'1'}`">

                    <text>今天</text>

                  </view>
                  <view :class="{ 'checkTitlefd2_0': tabsTypefd2_0 == '2', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd2_0 = '2'" :id="`benben_tabsfd2_0-title-item-${'2'}`">

                    <text>本周</text>

                  </view>
                  <view :class="{ 'checkTitlefd2_0': tabsTypefd2_0 == '3', 'flex flex-wrap align-center': true }"
                    @tap="tabsTypefd2_0 = '3'" :id="`benben_tabsfd2_0-title-item-${'3'}`">

                    <text>本月</text>

                  </view>
                </view>
                <view :style="{ left: tabsInfofd2_0.lineleft, maxWidth: tabsInfofd2_0.lineWidth ,}"
                  id="benben_tabsfd2_0-line" class="benben-tabs-line flex benben-flex-tabs-line huishoushuju_linefd2_0">
                </view>
              </view>
            </scroll-view>

          </benben-flex-tabs>

        </view>
        <view class='flex flex-wrap align-center justify-center flex-sub huishoushuju_fd2_1'>
          <view class='flex flex-direction flex-wrap align-center huishoushuju_fd2_1_c0'>
            <view class='flex flex-wrap align-center'>
              <text class='huishoushuju_fd2_1_c0_c0_c0'>{{tabsTypefd2_0==1 ? info.today_huishou_num :
              tabsTypefd2_0==2 ? info.week_huishou_num :
              tabsTypefd2_0==3 ? info.month_huishou_num : ''
              }}</text>
              <text>次</text>
            </view>
            <text class='huishoushuju_fd2_1_c0_c1'>回收总次数</text>
          </view>
          <view class='flex flex-wrap align-center justify-center huishoushuju_fd2_1_c0'>
            <view class='flex flex-direction flex-wrap align-center'>
              <view class='flex flex-wrap align-center'>
                <text class='huishoushuju_fd2_1_c0_c0_c0'>{{tabsTypefd2_0==1 ? info.today_huishou_weight :
              tabsTypefd2_0==2 ? info.week_huishou_weight :
              tabsTypefd2_0==3 ? info.month_huishou_weight : ''
              }}</text>
                <!-- <text>KG</text> -->
              </view>
              <text class='huishoushuju_fd2_1_c0_c1'>回收总数量</text>
            </view>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "tabsInfofd2_0": {
          lineleft: '',
          lineWidth: '',
          moveX: 0,
          scrollX: 0,
          PageScrollX: 0
        },
        "tabsTypefd2_0": "1",
        "info": {
          huishou_num: '',
          huishou_weight: '',
          month_huishou_num: '',
          month_huishou_weight: '',
          week_huishou_num: '',
          week_huishou_weight: '',
          today_huishou_num: '',
          today_huishou_weight: ''
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      isLogin() {
        return this.$store.state.token == '' ? false : true;
      }
    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.queryUserInfoFunc()
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {

      //查询用户详细信息
      async queryUserInfoFunc() {
        if (this.isLogin === true) {
          //请求方法
          //数据验证

          let datauserInfo = await this.$api.get(global.apiUrls.post65d17ed4d4010, {

          });

          if (datauserInfo.data.code != 1) {
            this.$message.info(datauserInfo.data.msg);
            return
          }
          let infouserInfo = datauserInfo.data;
          this.info = infouserInfo.data[0]
          console.log('；；；；', this.info)

        }
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: url(image-path('4.png')) no-repeat;
    background-size: 100% auto;
  }

  .huishoushuju_flex_0 {
    background: url(image-path('4.png')) no-repeat;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .huishoushuju_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #fff;
  }

  .huishoushuju_fd0_0_c0_c0 {
    color: rgba(255, 255, 255, 1);
    font-size: 36rpx;
    line-height: 28rpx;
  }

  .huishoushuju_fd0_0_c0 {
    width: 120rpx;
    height: 88rpx;
  }

  .huishoushuju_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .huishoushuju_fd1_0_c1_c0_c0 {
    font-style: normal;
  }

  .huishoushuju_fd1_0_c0_c1 {
    color: var(--benbenFontColor3);
    font-size: 24rpx;
    line-height: 40rpx;
  }

  .huishoushuju_fd1_0_c0_c0_c1 {
    color: var(--benbenFontColor3);
  }

  .huishoushuju_fd1_0_c0_c0_c0 {
    color: var(--benbenFontColor3);
    font-size: 40rpx;
  }

  .huishoushuju_fd1_0_c0 {
    width: 50%;
  }

  .huishoushuju_fd1_0 {
    width: 50%;
    margin: 24rpx 0rpx 50rpx 0rpx;
  }

  .huishoushuju_flex_2 {
    background: #FFF;
    width: 686rpx;
    margin: 0rpx auto 0rpx auto;
    padding: 24rpx;
    background-size: 100% auto;
    border-radius: 16rpx;
  }

  .huishoushuju_fd2_1_c0_c1 {
    color: var(--benbenFontColor2);
    font-size: 24rpx;
  }

  .huishoushuju_fd2_1_c0_c0_c0 {
    color: rgba(16, 51, 126, 1);
    font-size: 40rpx;
  }

  .huishoushuju_fd2_1_c0 {
    width: 50%;
  }

  .huishoushuju_fd2_1 {
    width: 50%;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .huishoushuju_linefd2_0 {
    background: rgba(238, 190, 25, 1);
    width: 100rpx;
    height: 8rpx;
    top: 80rpx;
    background-size: 100% auto !important;
  }

  .checkTitlefd2_0 {
    font-weight: 700 !important;
    font-size: 32rpx !important;
    color: #10337E !important;
    background-color: rgba(255, 255, 255, 1) !important;
  }

  ::v-deep .huishoushuju_benbenTabsfd2_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 630rpx;
    height: 90rpx;
    white-space: nowrap;
    text-align: center;
  }
</style>
